/**
 * desc: 教师信息接口
 */

import request from '@/static/uitls/request.js'

// 新增教师
const createTeacher = data => {
	return request({
		url: '/teacher/v1/user/create',
		method: 'POST',
		data
	})
}

// 修改教师信息
const editTeacher = data => {
	return request({
		url: '/teacher/v1/user/edit',
		method: 'POST',
		data
	})
}


// 教师回复
const commentReplay = data => {
	return request({
		url: '/teacher/v1/comment/replay',
		method: 'POST',
		data
	})
}
//教师中心
const getTeacherInfo = () => {
	return request({
		url: '/teacher/v1/user/info',
		method: 'GET',
		showOnload:false
	})
}
//教师账号余额
const getTeacherMoney = () => {
	return request({
		url: '/teacher/v1/user/money',
		method: 'GET'
	})
}
//账户明细
const getTeacherMoneyList = (data) => {
	return request({
		url: '/teacher/v1/money/log',
		method: 'GET',
		data
	})
}
// 提现记录
const getTeacherWithdrawList = (data) => {
	return request({
		url: '/teacher/v1/money/withdraw',
		method: 'GET',
		data
	})
}
//提现
const getWithdrawDeposit = (data) => {
	return request({
		url: '/teacher/v1/money/create',
		method: 'POST',
		data
	})
}
//课程评论
const getTeacherComment = (data) => {
	return request({
		url: '/teacher/v1/comment/index',
		method: 'GET',
		data
	})
}

//授课记录
const getTeacherCourse = (data) => {
	return request({
		url: '/teacher/v1/course/log',
		method: 'GET',
		data
	})
}

//编辑授课信息
const editTeacherInfo = data => {
	return request({
		url: '/teacher/v1/course/edit',
		method: 'GET',
		data
	})
}
module.exports = {
	createTeacher,
	editTeacher,
	commentReplay,
	getTeacherInfo,
	getTeacherMoney,
	getTeacherMoneyList,
	getTeacherWithdrawList,
	getWithdrawDeposit,
	getTeacherComment,
	getTeacherCourse,
	editTeacherInfo
}
